package com.apexedu.biz.service.impl;

import com.apexedu.biz.action.BusinessTabAction;
import com.apexedu.biz.entity.TAccessAppReg;
import com.apexedu.framework.service.impl.AbstractBaseServiceSupport;
import com.apexedu.framework.util.Pager;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * tab页上显示业务系统名称目录
 * User: houcong
 * Date: 14-4-14
 * Time: 上午11:17
 */
@Service("businessTabService")
public class BusinessTabServiceImpl extends AbstractBaseServiceSupport {

    @Override
    public void load(Object o) throws Exception {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public boolean remove(Object o) throws Exception {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void saveOrUpdate(Object o) throws Exception {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public List<?> list(Object o, Pager pager) throws Exception {
        BusinessTabAction action = (BusinessTabAction) o;
        List<TAccessAppReg> listApp = getBaseDao().findByHql("from TAccessAppReg where state = 1 order by ordernum desc,appid ");
        action.setListApp(listApp);
        String type = action.getParameter("type"); //类型 menu为权限菜单 user为用户角色
        action.setParameter("type", type);
        return null;
    }
}
